package org.jeecg.modules.workvehicleborrow.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.workvehicleborrow.entity.WorkVehicleBorrow;
import org.jeecg.modules.workvehicleborrow.mapper.WorkVehicleBorrowMapper;
import org.jeecg.modules.workvehicleborrow.service.IWorkVehicleBorrowService;
import org.jeecg.modules.workvehicleborrow.vo.workvehicleborrowVo;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: work_vehicle_borrow
 * @Author: jeecg-boot
 * @Date:   2021-08-25
 * @Version: V1.0
 */
@Service
public class WorkVehicleBorrowServiceImpl extends ServiceImpl<WorkVehicleBorrowMapper, WorkVehicleBorrow> implements IWorkVehicleBorrowService {

    @Resource
    private WorkVehicleBorrowMapper workVehicleBorrowMapper;
    @Override
    public List<workvehicleborrowVo> findworkvehicleborrow(Page page, String borrowStartTime, String vehicleNumber) {

        return workVehicleBorrowMapper.findworkvehicleborrow(page,borrowStartTime,vehicleNumber);
    }

    /**
     * 删除id
     *
     * @param id
     * @return
     */
    @Override
    public int del(String id) {
        return workVehicleBorrowMapper.del(id);
    }

    /**
     * 根据id查询还车时间
     *
     * @param id
     * @return
     */
    @Override
    public String findendTime(String id) {
        return workVehicleBorrowMapper.findendTime(id);
    }

    /**
     * 分配车俩
     *
     * @param workvehicleborrowVo
     * @return
     */
    @Override
    public int insert(workvehicleborrowVo workvehicleborrowVo) {
        return workVehicleBorrowMapper.insert(workvehicleborrowVo);
    }

    /**
     * 查询借车时间
     *
     * @param id
     * @return
     */
    @Override
    public String findstartTime(String id) {
        return workVehicleBorrowMapper.findstartTime(id);
    }

    /**
     * 查询车俩但前状态
     *
     * @param id
     * @return
     */
    @Override
    public int findvehicleState(String id) {
        return workVehicleBorrowMapper.findvehicleState(id);
    }


}
